﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="frmCondicionIvaNuevo.aspx.cs" Inherits="_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 230px;
        }
        
         .style20
        {
             position: absolute;
            left: 181px;
            top: 232px;
        }
         .style21
        {
            position: absolute;
            left: 428px;
            top: 235px;
        }
        .style22
        {
            position: absolute;
            top: 210px;
            left: 183px;
            z-index: 1;
            width: 227px;
            right: 672px;
        }
        .style23
        {
            position: absolute;
            top: 211px;
            left: 430px;
            z-index: 1;
        }
         .style24
        {
            position: absolute;
            left: 192px;
            top: 271px;
            width: 189px;
        }
         .style25
        {
            position: absolute;
            left: 182px;
            top: 293px;
        }
         </style>
    </asp:Content>

    <asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <div id="menu_lateral">
        <h4>
            Menu</h4>
        <br>
        <p>
        <a href="frmTipoDocumentoAlta.aspx">Tipo de Documento</a>
        <br>
        <a href="frmTipoTelefonoAlta.aspx">Tipo Teléfono</a>
        <br>
        <a href="frmCondicionIvaNuevo.aspx">Condicion IVA</a>
        <br>
        <a href="frmCargoAlta.aspx">Cargo</a>
        <br>
        <a href="frmProvincia.aspx">Provincia</a>
        <br>
        <a href="frmLocalidad.aspx">Localidad</a>
        <br>
        <a href="frmBarrio.aspx">Barrio</a>
        <br>
        <a href="frmTipoIngrediente.aspx">Tipo de Ingrediente</a>
        <br>
        <a href="frmEnvase.aspx">Tipo de Envase</a>
        </p>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h1>Administrar Condicion de IVA</h1>
    <p>
        <asp:Label ID="Label4" runat="server" CssClass="style23" Font-Bold="True" 
            Text="Lista de Tipos de Condicion IVA"></asp:Label>
    </p>
    <p>
        <table style="width:100%;">
            
            <tr>
                <td class="style1" style="font-weight: bold" valign="top">
                    <asp:Label ID="Label3" runat="server" CssClass="style22" 
                        Text="Ingrese Nueva Condicion IVA"></asp:Label>
                    <br />
        <asp:TextBox ID="TextBox1" runat="server" Width="200px" CssClass="style20" Height="35px"></asp:TextBox>
                    <br />
                    <br />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
            ControlToValidate="TextBox1" ErrorMessage="Debe completar este campo" 
            Font-Bold="True" CssClass="style24" ForeColor="Red"></asp:RequiredFieldValidator>
                    <br />
        <asp:Label ID="Label1" runat="server" Font-Bold="True" ForeColor="#0033CC"></asp:Label>
                    <br />
                    <br />
    <asp:Button ID="Button1" runat="server" Height="35px" CssClass="style25" onclick="Button1_Click" 
        Text="Agregar" Width="200px" />
                    <br />
                    <br />
        <asp:Button ID="Button6" runat="server" Height="30px" onclick="Button6_Click" 
            Text="Regresar" Width="189px" CausesValidation="False" Visible="False" />
                </td>
                <td style="font-weight: bold" valign="top">
                    &nbsp;</td>
                <td valign="top">
                    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                        AutoGenerateColumns="False" DataKeyNames="idCondIva" 
                        DataSourceID="SqlDataSource2" 
                        EmptyDataText="No hay registros de datos para mostrar." 
                        AllowSorting="True" BackColor="White" BorderColor="White" 
                        BorderStyle="Ridge" CssClass="style21"
                        BorderWidth="2px" CellPadding="3" CellSpacing="1" GridLines="None" 
                        Width="268px">
                        <Columns>
                            <asp:CommandField ButtonType="Image" 
                                DeleteImageUrl="~/Img/ico_chico_eliminar.png" 
                                EditImageUrl="~/Img/ico_chico_edicion.png" ShowDeleteButton="True" 
                                ShowEditButton="True" CancelImageUrl="~/Img/ico_chico_cancelar.png" 
                                UpdateImageUrl="~/Img/ico_chico_ok.png" CausesValidation="False" 
                                HeaderText="Acciones" >
                            <ItemStyle HorizontalAlign="Center" />
                            </asp:CommandField>
                            <asp:BoundField DataField="descripcionCondIva" HeaderText="Tipo Condicion IVA" 
                                SortExpression="descripcionCondIva" />
                        </Columns>
                        <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
                        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
                        <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
                        <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
                        <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
                        <SortedAscendingCellStyle BackColor="#F1F1F1" />
                        <SortedAscendingHeaderStyle BackColor="#594B9C" />
                        <SortedDescendingCellStyle BackColor="#CAC9C9" />
                        <SortedDescendingHeaderStyle BackColor="#33276A" />
                    </asp:GridView>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                        DeleteCommand="UPDATE [T_CondIva] SET [habilitado] = '0' WHERE [idCondIva] = @idCondIva" 
                        InsertCommand="INSERT INTO T_CondIva(descripcionCondIva, habilitado) VALUES (@descripcionCondIva, '1')" 
                        SelectCommand="SELECT idCondIva, descripcionCondIva FROM T_CondIva WHERE (T_CondIva.habilitado &gt; 0)" 
                        
                        
                        
                        
                        UpdateCommand="UPDATE [T_CondIva] SET [descripcionCondIva] = @descripcionCondIva WHERE [idCondIva] = @idCondIva">
                        <InsertParameters>
                            <asp:Parameter Name="descripcionCondIva" />
                        </InsertParameters>
                        <DeleteParameters>
                            <asp:Parameter Name="idCondIva" />
                        </DeleteParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="descripcionCondIva" />
                            <asp:Parameter Name="idCondIva" />
                        </UpdateParameters>
                    </asp:SqlDataSource>
                </td>
                
            </tr>
            
        </table>
    </p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>
        &nbsp;</p>
<p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
<p>
    &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
<p>
    &nbsp;</p>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        InsertCommand="INSERT INTO T_CondIva(descripcionCondIva, habilitado) VALUES ( @desc , @habilitado)" 
        
        
        
    
    
        SelectCommand="SELECT idCondIva, descripcionCondIva FROM T_CondIva">
        <InsertParameters>
            <asp:Parameter Name="desc" />
            <asp:Parameter Name="habilitado" />
        </InsertParameters>
    </asp:SqlDataSource>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
</asp:Content>

